
<?php include_once(dirname(__FILE__) . '/../general/head.php'); ?>

<!-- header -->
<?php include_once(dirname(__FILE__) . '/../general/header.php'); ?>

<?php include_once('left.php'); ?>


<div id="page-wrapper">


    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Calibration</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        

        <div class="col-lg-12">
            <div class="panel panel-default">
                
                <div class="panel-body">
                    <p>Chỉ nhấn nút "Calibration" sau khi đã có đầy đủ kết quả làm bài trắc nghiệm, kết quả đánh giá thái độ, và kết quả Sales performance.</p>


                    <a>
                        <form method="post" action="<?php echo site_url(get_folder($loggedUser['title']) . '/calibrations/calibrate'); ?>" onsubmit="return confirm('Bạn có chắc là muốn thực hiện Calibration?');">
                            <input type="hidden" value="<?php echo $evaluation['id']; ?>" name="eid" />
                            <input type="submit" value="Calibration" class="btn btn-primary btn-lg" />
                        </form>
                    </a>

                    <br>
<!--                    <a href="<?php echo site_url(get_folder($loggedUser['title']) . '/quizzes/add_new'); ?>"> <img src="<?php echo base_url(); ?>images/plus.png" title="Thêm bài test mới"> Thêm bài test mới</a>
                    <br>-->
                </div>
                <!-- /.panel-body -->
            </div>
        </div>
    </div>

</div>
<!-- /#page-wrapper -->
<!--<script type="text/javascript" src="<?php echo base_url(); ?>js/filter-region-title.js"></script>-->
<script>
    function search()
    {
        var region = "";
        var title = "";

        $("select[name=filter-region] option:selected").each(function() {
            region = $(this).val();
        });
        $("select[name=filter-title] option:selected").each(function() {
            title = $(this).val();
        });
        window.location = '<?php echo site_url(get_folder($loggedUser['title']) . '/calibrations/index') ?>' + '/' + region + '/' + title;
    }

    $(document).ready(function() {
        var oTable = $('#final-results').dataTable(
                {
                    "scrollX": true,
                    "sScrollX": "120%",
                    //"bScrollCollapse": true,
                    //"sScrollXInner": "110%",
                    //"bScrollAutoCss": true,
                    "columnDefs": [
                        {
                            "targets": [0],
                            "visible": false,
                            "searchable": false,
                            "orderData": [0, 1]
                        },
                        {
                            "targets": [1],
                            "visible": false,
                            "searchable": false,
                            "orderData": [0, 1]
                        },
                        {
                            "targets": [2],
                            "visible": false,
                            "searchable": false,
                            "orderData": [0, 1]
                        }
                    ]
                }
        );

        $('select[name=filter-region]').change(function() {
            search();
        });

        $('select[name=filter-title]').change(function() {
            search();
        });



    });

</script>
<?php include_once(dirname(__FILE__) . '/../general/footer.php'); ?>